#include <vector>
#include <iostream>

using namespace std;

int main(int argc, char *argv[]){
    int a = 1;
    const int b = 2;
    const int &rca = a;
    const int &rcb = b;

    auto &x1 = const_cast<int&>(rca);
    auto &x2 = const_cast<int&>(rcb);

    x1 = 3;
    x2 = 4;
    cout << x1 << " " << x2 << endl; // 3 4
    cout << a << " " << b << endl; // 3 2（这个2未定义！）

    int &ra = a;
    int &rb = a;
    auto &y1 = const_cast<const int &>(ra);
    auto &y2 = const_cast<const int &>(rb);

    y1 = 3;
    y2 = 4;

    return 0;
}